package com.naiterui.ehp.bs;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

import com.naiterui.common.redis.config.EnableRedisAutoConfiguration;
import com.naiterui.common.repository.core.BaseJpaRespositoryImpl;
import com.naiterui.common.repository.core.BaseMongoRepositoryImpl;
import com.naiterui.ehp.bs.esign.api.wukong.config.EnableEsignAutoConfiguration;

// @EnableNetrainAutoConfiguration
@EnableEsignAutoConfiguration
// @EnableSccaAutoConfiguration
@EnableWebMvc
@EnableAsync
@EnableFeignClients
@ComponentScan("com.naiterui")
@EnableRedisAutoConfiguration
@EnableMongoRepositories(basePackages = {"com.naiterui.ehp.bs.*.repository.mongo"}, repositoryBaseClass = BaseMongoRepositoryImpl.class)
@EnableJpaRepositories(basePackages = {"com.naiterui.ehp.bs.*.repository.mysql",
    "com.naiterui.ehp.bs.b2c.*.repository", "com.naiterui.ehp.bs.esign.api.*.repository"}, repositoryBaseClass = BaseJpaRespositoryImpl.class)
@SpringBootApplication
@RefreshScope
public class MedicalServer {

    public static void main(String[] args) {
        SpringApplication.run(MedicalServer.class, args);
    }
}
